Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardcoded Home link from navigation #986

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

frankieroberto
Copy link
Contributor

@frankieroberto frankieroberto commented Jul 17, 2024

Removes the link to "/" labelled "Home", which is currently hardcoded, and only shows up within the navigation menu on mobile screen widths.

This link may not be appropriate for all services, which might not have a homepage, or might use a different path for it.

It is also unclear whether having a homepage link is needed in the navigation if the NHS logo also goes to the homepage, and if it is needed, whether it should always be present rather than only within the mobile menu.

Services who want to continue to include the Home link can do so by adding an additional class using the Header component like this:

{{ header({
  "showNav": "true",
  "showSearch": "false",
  "primaryLinks": [
    {
      "url"  : "/conditions",
      "label" : "Health A-Z"
    },
    { ... },
    {
      "url" : "/",
      "label" : "Home",
      "classes": "nhsuk-header__navigation-item--home"
    }
  ]
}) }}

This should probably be considered a breaking change, as services would need to update their HTML if they want to keep the Home link?

Checklist

Removes the link to `"/"` labelled `"Home"`, which is currently hardcoded, and only shows up within the navigation menu on mobile screen widths.

This link may not be appropriate for all services, which might not have a homepage, or might use a different path for it.

It is also unclear whether having a homepage link is always needed in the navigation if the NHS logo also goes to the homepage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants